/*
 * PlayerChosenEvent.java
 *
 * Created on October 10, 2005, 8:25 PM
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package com.bff.slimserver.musicjukebox.lib.events;

import java.util.EventObject;
import org.bff.slimserver.SlimPlayer;

/**
 * Represents a change in the status of a MPD playlist.
 * @author Bill Findeisen
 */
public class PlayerChosenEvent extends EventObject {
    private SlimPlayer newPlayer;
    private int id;
    
    public static final int PLAYER_CHOSEN = 1;
    
    
    /**
     * 
     * Creates a new instance of PlayListChangeEvent
     * @param source the object on which the Event initially occurred
     * @param id the specific event that occurred
     */
    public PlayerChosenEvent(Object source, int id) {
        super(source);
        this.id = id;
    }
    
    /** 
     * Creates a new instance of PlayListChangeEvent
     * @param source the object on which the Event initially occurred
     * @param id the specific event that occurred
     * @param msg an optional message
     */
    public PlayerChosenEvent(Object source, int id, SlimPlayer newPlayer) {
        super(source);
        this.id = id;
        this.newPlayer = newPlayer;
    }
    
    /**
     * Returns specific id of the event that occurred.  The ids are public static
     * fields in the class.
     * @return the specific id
     */
    public int getId() {
        return(id);
    }

    public SlimPlayer getNewPlayer() {
        return newPlayer;
    }

    public void setNewPlayer(SlimPlayer newPlayer) {
        this.newPlayer = newPlayer;
    }
}
